import os

folder_name = input("请输入要重命名的文件夹：")

file_names = os.listdir(folder_name)  # 如果文件目录不存在会报错

for name in file_names:
    print(name)
    old_file_name = folder_name + "/" + name
    new_file_name = folder_name + "/" + "[ywc]" + name
    os.rename(old_file_name, new_file_name)



